/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Trabalho3.RegrasPasswordChecker01;

import Trabalho3.RuleFactory;

/**
 *
 * @author geraldo
 */
public class RegraLetrasMinusculas implements RuleFactory{
    final int BONUS_MINUSCULAS = 1;
    String password;

    public RegraLetrasMinusculas(String password) {
        this.password = password;
    }
    
    
    @Override
    public int calcularRegra(){
        for (char a : password.toCharArray()) {
            if (Character.isLowerCase(a)) {
                return BONUS_MINUSCULAS;
            }
        }
        return 0;
    };
    
 }
